<template>
    <div class="right">
        <ul>
            <li v-for="(item,index) in categorytwo" :key="index" @click="goThrt(item.id,item.pid,index)">
                <img :src="item.picUrl" alt="">
                <p>{{item.name}}</p>
            </li>
        </ul>
    </div>
</template>

<script>
export default {
    data(){
        return{
            categorytwo:[]
        }
    },
    created(){

    },
    methods:{
        goThrt(id,pid,index){
            this.$router.push({
                name:'typeThr',
                query:{
                    category_pid:pid,
                    category_id:id,
                    i:index
                }
            })
            console.log(id)
            console.log(pid)
            // alert(index)
        }
    }
}
</script>

<style lang="scss" scoped>
.right{
    ul{
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 20px;
        li{
            img{
                width: 70px;
                height: 70px;
            }
            p{
                text-align: center;
            }
            margin-bottom: 15px;
        }
    }
}
</style>